// models/user.js
const Sequelize = require('sequelize');
const sequelize = require('../config/db').sequelize; // 导入数据库连接实例

const User = sequelize.define('user_table', {
  ID: {
    type: Sequelize.INTEGER,
    primaryKey: true,
    autoIncrement: true
  },
  Username: {
    type: Sequelize.STRING
  },
  Passwd: {
    type: Sequelize.STRING
  },
  Realname: {
    type: Sequelize.STRING
  },
  Tel: {
    type: Sequelize.STRING
  },
  PlantID: {
    type: Sequelize.STRING
  },
  AUTHID: {
    type: Sequelize.INTEGER
  }
}, {
  tableName: 'user_table', // 指定数据库中的表名
  timestamps: false
});

module.exports = User;
